package com.site.dao;

import com.site.pojo.Reserve;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 * FileName: ReceiveDao.java
 * 货架表Dao
 *
 * @author 田尚忠
 * @Date    2021/11/28
 * @version 1.00
 */
public interface ReserveDao {
    /*查询方法*/
        //查询全部
        List<Reserve> selectAll() throws SQLException;

        //按照货架编号查询
        Reserve selectByid(int id) throws SQLException;

        //按照货物id编号查询
        List<Reserve> selectByGoodsId(int id) throws SQLException;

        //按照状态查询
        List<Reserve> selectByState(int state) throws SQLException;

    /*增加方法*/
        int addReserve(Reserve reserve);
        int addReserve(Connection conn,Reserve reserve);
    /*删除方法*/
        //通过货架编号删除
        int delByrid(int id);
        int delByrid(Connection conn, int id);

        //通过状态删除
        int delByState(int state);
        int delByState(Connection conn,int state);
    /*修改方法*/
        //通过id修改
        int updateReserve(int id,Reserve reserve);
        int updateReserve(Connection conn,int id,Reserve reserve);
}
